package controllers;

import helpers.GeneralHelper;
import helpers.LanguageHelper;
import helpers.StringHelper;
import helpers.UrlHelper;

import java.io.IOException;
import java.net.URLDecoder;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;

import javax.cache.Cache;
import javax.script.Bindings;
import javax.script.CompiledScript;
import javax.script.ScriptContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import models.CategoryModel;
import models.PageModel;

import quercus.CompileScriptEngine;
import systems.ConfigSystem;
import systems.Recently;
import systems.RecentlyTag;

import admin.models.MetaSeoModel;

import com.google.appengine.api.users.UserService;
import com.google.appengine.api.users.UserServiceFactory;

import entities.Ads;
import entities.Article;
import entities.Category;
import entities.MetaSeo;
import entities.Page;
import entities.SeoData;
import entities.SiteConfig;
import entities.User;

public class AboutUsServlet extends HttpServlet {
	public void doGet(HttpServletRequest request, HttpServletResponse response)
		throws IOException, ServletException {
		
		SiteConfig config = ConfigSystem.getConfigs();
		
		PageModel pageModel = PageModel.getInstance();
		Page aboutus = pageModel.getAboutUs();
		
		//Set seo content
		MetaSeoModel metaseoModel = MetaSeoModel.getInstance();
		MetaSeo metaseo = metaseoModel.get("about");
		
		request.setAttribute("staticPage", aboutus);
		request.setAttribute("metaseo", metaseo);
		try {
			request.getRequestDispatcher("/templates/" + config.getTemplate() + "/pages/static_page.jsp").forward(request, response);
		} catch (ServletException e) {
			//e.printStackTrace();
		}
	}
}
